package com.yqg.manage.mapper;

import com.yqg.manage.entity.Archive;
import com.yqg.manage.entity.ArchiveNode;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zxf
 * @since 2024-04-30
 */
@Mapper
public interface ArchiveNodeMapper extends BaseMapper<ArchiveNode> {

//    @Select("select * from archive order by id desc")
    @Select("select * from archive where archive.id in (select archive_node.archive_id from archive_node where archive_node.routine_type_id = #{routineTypeId} and archive_node.node_id = #{archiveNodeId})")
    List<Archive> getNowDocument(Integer routineTypeId, Integer archiveNodeId);
}
